"""
https://docs.python.org/3/howto/argparse.html
"""
import argparse

parser = argparse.ArgumentParser()
parser.add_argument('base', type=int, help='Display square of this base number.')
parser.add_argument('-v', '--verbose',

                    # type=int,
                    # choices=[0, 1, 2],

                    action='count',
                    default=0,

                    help='Increase output verbosity.')
parser.add_argument('-m', '--my', help='My test argument. (type=float)', type=float)
args = parser.parse_args()
square = args.base ** 2
if 2 <= args.verbose:
    print(f'Square of {args.base} is {square}.')
elif 1 <= args.verbose:
    print(f'{args.base} ** 2 = {square}')
else:
    print(square)
print(f'my test arg: {args.my}')
